home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / CMConversions.a < prev    next >
Text File  |  1996-05-01  |  5KB  |  233 lines

  1. ;
  2. ;    File:        CMConversions.a
  3. ;
  4. ;    Contains:    ColorSync base <-> derived color space conversion Component interface
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.0
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__CMCONVERSIONS__') = 'UNDEFINED' THEN
  19. __CMCONVERSIONS__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  25.     include 'Components.a'
  26.     ENDIF
  27.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  28.     include 'CMApplication.a'
  29.     ENDIF
  30.     IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
  31.  
  32. CMConversionInterfaceVersion    EQU        1
  33. ;  Component function selectors 
  34.  
  35. kCMXYZToLab                        EQU        0
  36. kCMLabToXYZ                        EQU        1
  37. kCMXYZToLuv                        EQU        2
  38. kCMLuvToXYZ                        EQU        3
  39. kCMXYZToYxy                        EQU        4
  40. kCMYxyToXYZ                        EQU        5
  41. kCMRGBToHLS                        EQU        6
  42. kCMHLSToRGB                        EQU        7
  43. kCMRGBToHSV                        EQU        8
  44. kCMHSVToRGB                        EQU        9
  45. kCMRGBToGRAY                    EQU        10
  46. kCMXYZToFixedXYZ                EQU        11
  47. kCMFixedXYZToXYZ                EQU        12
  48. ;
  49. ; pascal ComponentResult CMXYZToLab(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  50. ;
  51.     IF ¨ GENERATINGCFM THEN
  52.         Macro
  53.         _CMXYZToLab
  54.             move.l              #$00100000,-(sp)
  55.             moveq               #0,D0
  56.             dc.w                $A82A
  57.         EndM
  58.     ELSE
  59.         IMPORT_CFM_FUNCTION CMXYZToLab
  60.     ENDIF
  61.  
  62. ;
  63. ; pascal ComponentResult CMLabToXYZ(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  64. ;
  65.     IF ¨ GENERATINGCFM THEN
  66.         Macro
  67.         _CMLabToXYZ
  68.             move.l              #$00100001,-(sp)
  69.             moveq               #0,D0
  70.             dc.w                $A82A
  71.         EndM
  72.     ELSE
  73.         IMPORT_CFM_FUNCTION CMLabToXYZ
  74.     ENDIF
  75.  
  76. ;
  77. ; pascal ComponentResult CMXYZToLuv(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  78. ;
  79.     IF ¨ GENERATINGCFM THEN
  80.         Macro
  81.         _CMXYZToLuv
  82.             move.l              #$00100002,-(sp)
  83.             moveq               #0,D0
  84.             dc.w                $A82A
  85.         EndM
  86.     ELSE
  87.         IMPORT_CFM_FUNCTION CMXYZToLuv
  88.     ENDIF
  89.  
  90. ;
  91. ; pascal ComponentResult CMLuvToXYZ(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  92. ;
  93.     IF ¨ GENERATINGCFM THEN
  94.         Macro
  95.         _CMLuvToXYZ
  96.             move.l              #$00100003,-(sp)
  97.             moveq               #0,D0
  98.             dc.w                $A82A
  99.         EndM
  100.     ELSE
  101.         IMPORT_CFM_FUNCTION CMLuvToXYZ
  102.     ENDIF
  103.  
  104. ;
  105. ; pascal ComponentResult CMXYZToYxy(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  106. ;
  107.     IF ¨ GENERATINGCFM THEN
  108.         Macro
  109.         _CMXYZToYxy
  110.             move.l              #$000C0004,-(sp)
  111.             moveq               #0,D0
  112.             dc.w                $A82A
  113.         EndM
  114.     ELSE
  115.         IMPORT_CFM_FUNCTION CMXYZToYxy
  116.     ENDIF
  117.  
  118. ;
  119. ; pascal ComponentResult CMYxyToXYZ(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  120. ;
  121.     IF ¨ GENERATINGCFM THEN
  122.         Macro
  123.         _CMYxyToXYZ
  124.             move.l              #$000C0005,-(sp)
  125.             moveq               #0,D0
  126.             dc.w                $A82A
  127.         EndM
  128.     ELSE
  129.         IMPORT_CFM_FUNCTION CMYxyToXYZ
  130.     ENDIF
  131.  
  132. ;
  133. ; pascal ComponentResult CMRGBToHLS(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  134. ;
  135.     IF ¨ GENERATINGCFM THEN
  136.         Macro
  137.         _CMRGBToHLS
  138.             move.l              #$000C0006,-(sp)
  139.             moveq               #0,D0
  140.             dc.w                $A82A
  141.         EndM
  142.     ELSE
  143.         IMPORT_CFM_FUNCTION CMRGBToHLS
  144.     ENDIF
  145.  
  146. ;
  147. ; pascal ComponentResult CMHLSToRGB(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  148. ;
  149.     IF ¨ GENERATINGCFM THEN
  150.         Macro
  151.         _CMHLSToRGB
  152.             move.l              #$000C0007,-(sp)
  153.             moveq               #0,D0
  154.             dc.w                $A82A
  155.         EndM
  156.     ELSE
  157.         IMPORT_CFM_FUNCTION CMHLSToRGB
  158.     ENDIF
  159.  
  160. ;
  161. ; pascal ComponentResult CMRGBToHSV(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  162. ;
  163.     IF ¨ GENERATINGCFM THEN
  164.         Macro
  165.         _CMRGBToHSV
  166.             move.l              #$000C0008,-(sp)
  167.             moveq               #0,D0
  168.             dc.w                $A82A
  169.         EndM
  170.     ELSE
  171.         IMPORT_CFM_FUNCTION CMRGBToHSV
  172.     ENDIF
  173.  
  174. ;
  175. ; pascal ComponentResult CMHSVToRGB(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  176. ;
  177.     IF ¨ GENERATINGCFM THEN
  178.         Macro
  179.         _CMHSVToRGB
  180.             move.l              #$000C0009,-(sp)
  181.             moveq               #0,D0
  182.             dc.w                $A82A
  183.         EndM
  184.     ELSE
  185.         IMPORT_CFM_FUNCTION CMHSVToRGB
  186.     ENDIF
  187.  
  188. ;
  189. ; pascal ComponentResult CMRGBToGray(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  190. ;
  191.     IF ¨ GENERATINGCFM THEN
  192.         Macro
  193.         _CMRGBToGray
  194.             move.l              #$000C000A,-(sp)
  195.             moveq               #0,D0
  196.             dc.w                $A82A
  197.         EndM
  198.     ELSE
  199.         IMPORT_CFM_FUNCTION CMRGBToGray
  200.     ENDIF
  201.  
  202. ;
  203. ; pascal ComponentResult CMXYZToFixedXYZ(ComponentInstance ci, const CMXYZColor *src, CMFixedXYZColor *dst, unsigned long count)
  204. ;
  205.     IF ¨ GENERATINGCFM THEN
  206.         Macro
  207.         _CMXYZToFixedXYZ
  208.             move.l              #$000C000B,-(sp)
  209.             moveq               #0,D0
  210.             dc.w                $A82A
  211.         EndM
  212.     ELSE
  213.         IMPORT_CFM_FUNCTION CMXYZToFixedXYZ
  214.     ENDIF
  215.  
  216. ;
  217. ; pascal ComponentResult CMFixedXYZToXYZ(ComponentInstance ci, const CMFixedXYZColor *src, CMXYZColor *dst, unsigned long count)
  218. ;
  219.     IF ¨ GENERATINGCFM THEN
  220.         Macro
  221.         _CMFixedXYZToXYZ
  222.             move.l              #$000C000C,-(sp)
  223.             moveq               #0,D0
  224.             dc.w                $A82A
  225.         EndM
  226.     ELSE
  227.         IMPORT_CFM_FUNCTION CMFixedXYZToXYZ
  228.     ENDIF
  229.  
  230.     ENDIF
  231.     ENDIF ; __CMCONVERSIONS__ 
  232.  
  233.